package com.ydy.threadpool.task;

import com.ydy.model.RequestLog;
import com.ydy.service.requestLog.RequestLogService;

public class SaveLogTask implements Runnable {

	private RequestLog requestLog;
	private RequestLogService requestLogService;

	public SaveLogTask(RequestLog requestLog, RequestLogService requestLogService) {
		this.requestLog = requestLog;
		this.requestLogService = requestLogService;
	}

	@Override
	public void run() {
		if (this.requestLog == null)
			return;
		requestLogService.saveOrUpdate(requestLog);
	}

}
